<template>
    <div>
        <div class="header">
            <div class="top">
                <van-icon name="arrow-left" size='26px' color='#333' @click="handleJump"/>
                <span>我的收藏</span>
                <van-icon name="ellipsis" size='26px' color='#333'/>
            </div>
        </div>
        <div class="list">
            <ul>
                <li v-for="(item,index) in shoucang" :key="index">
                    <div class="img">
                        <img :src="`https://www.160dyf.com/${item.goodsImg}`" alt="">
                    </div>
                    <h2> <i>Rx</i> {{item.goodsName}}</h2>
                    <p>￥{{item.goodsPrice}}<em>已售{{item.goodsPayNum}}</em></p>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
    import request from '../utils/request'
    
    export default {
        data() {
            return {
                list: [],
                newlist:[],
                scor:"https://www.160dyf.com/",
                loading: false,
                finished: false,
                p:1   //分页页码
            }
        },
        created () {
            console.log(this.shoucang);
        },
        methods: {
            handleJump(){
                this.$router.go(-1)
            }
        },
        computed: {
            shoucang() {
                return this.$store.state.detail.shoucang
            }
        },
    }
</script>

<style src="../assets/css/goodlist.css" scoped></style>

<style scoped>
.header{
    display: flex;
    padding: 10px 15px;
}
.header .top{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header .top span{
    font-size: 16px;
    color: #333;
}
.list em{
    color: #999;
    font-size: 12px;
    text-decoration: none !important;
    margin-left: 10px;
}
.list i{ 
    padding: 0 10px;
    background: #f22e00;
    border-radius: 50%;
    display: inline-block;
    color: #fff;
    font-size: 12px;
    font-family: PingFangSC-Regular;
}
</style>